<?php

require("header.php");
require("table_des_matieres.php");

if (isset($supprimerAlert))
{
	echo '
	<fieldset class="alertfieldset">
		<legend>'.$language[$_SESSION['lang']]["Warning"].'</legend>
		'.$language[$_SESSION['lang']]["SureDeleteGood"].'
		<form method="post">
			<input type="hidden" name="good" value="'.$_POST["good"].'"
			<input type="submit" name="supprimervalider" value="'.$language[$_SESSION['lang']]["Valid"].'" />
			<input type="submit" value="'.$language[$_SESSION['lang']]["Cancel"].'" />
		</form>
	</fieldset>';
}
elseif (isset($supprimerDone))
{
	
	echo '
	<fieldset class="alertfieldset">
		<legend>'.$language[$_SESSION['lang']]["Information"].'</legend>
		'.$language[$_SESSION['lang']]["GoodDeleted"].'
	</fieldset>';
	
}

foreach ($goods as $good) {
	echo '<fieldset>
				<legend>'.$good->nom.'</legend>
				<table>
					<tr>
						<td class="locationLegend">'.$language[$_SESSION['lang']]["Description"].' :</td>
						<td>'.$good->description.'</td>
					</tr>
					<tr>
						<td class="locationLegend">'.$language[$_SESSION['lang']]["Address"].' :</td>
						<td>'.$good->numero.' '.$good->rue_1.$good->rue_2.$good->rue_3.' '.$good->cp.' '.$good->ville.' '.$good->pays.'</td>
					</tr>
					<tr>
						<td class="locationLegend">'.$language[$_SESSION['lang']]["Capacity"].' :</td>
						<td>'.$good->capacite.' '.$language[$_SESSION['lang']]["People"].'</td>
					</tr>
					<tr>
						<td class="locationLegend">'.$language[$_SESSION['lang']]["Category"].' :</td>
						<td>'.$good->categorie.'</td>
					</tr>
					<tr>
						<td></td>
						<td>
						<form method="post">
							<input type="hidden" name="good" value="'.$good->id_bien.'">
							<input type="submit" name="supprimer" value="'.$language[$_SESSION['lang']]["Delete"].'" >
							<input type="submit" name="editer" value="'.$language[$_SESSION['lang']]["Edit"].'" >
							<input type="submit" name="pics" value="'.$language[$_SESSION['lang']]["ManagePics"].'">
							<input type="submit" name="coms" value="'.$language[$_SESSION['lang']]["ManageComs"].'">
						</form>
						</td>
					</tr>
				</table>
			</fieldset>';
}

require("footer.php");

?>
